#include "htf_engine.h"
#include "htf_ai_interface.h"
#include <stdio.h>

// Simulate sensor input (in practice, it can come from ADC / I2C)
static float g_sensor_input[4] = {1.2f, -0.5f, 0.8f, 2.1f};

void htf_engine_process(void) {
    printf("HTF Engine: Running AI inference...\n");

    float output[3] = {0};
    if (htf_ai_init() == 0) {
        int ret = htf_ai_run_inference(g_sensor_input, 4, output, 3);
        if (ret == 0) {
            printf("AI Result: [%.3f, %.3f, %.3f]\n", output[0], output[1], output[2]);
        } else {
            printf("AI inference failed!\n");
        }
        htf_ai_deinit();
    }
}